package com.woniuxy.secondkill.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

@Configuration
@EnableScheduling   //开启定时任务
public class TaskTestConfiguration {

    //指定策略
//    @Scheduled(cron = "0/1 * * * * ?")
//    public void task(){
//        System.out.println("当前时间为"+new Date());
//    }
}
